-
-
Notifications
You must be signed in to change notification settings - Fork 27
Improve cmake vdate depends #517
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…nged Creating vdate.c/vdate.o should not be done unconditionally. It is only necessary to recreate it if one of the input files has changed.
The variable MaikoGitVersion will contain a git revision from the head of the source tree along with an indication if the status was "dirty". If git is not present on the system or the directory that the build happened in was not under git control the version will be "none".
Approved. I use something similar in my Java (Gradle) projects. It would be slick if this information were accessible from Lisp core - but not as part of this PR. |
Yes, making it visible from Lisp would be good. I'd probably change the format of the version string too. It's not trivial to create a new string in Lisp space from the C side, anything that does that tends to overwrite the characters of an existing string when the variable gets passed down to a subr. The BCPL username is a special case, where there are 32 words allocated in the interface page at a known offset, and we just fill it in and then adjust the layout to account for byte swapping. |
If we cheat by making the version a "semantic versioning" triple of integers, would it be easier? For example, version 1.2.3 would be represented as the three numbers (unsigned bytes, really) 1, 2, and 3. |
Doesn't help too much with a Git commit hash. There is already a Maiko build date, and version numbers Lisp, "microcode", and BCPL --
The MDate (the Maiko build date) is used to set the And, as the comment says in
Where the LVERSION and MINBVERSION constants track each other in the Maiko code with values of 15000, 20000, 20100, 21000, 30000, 35000, and 35010, but the ifpage.lversion is currently 39424 - the only place that gets set is by |
True, git revision hashes have to be strings to be useful. The rest of the explanation is great stuff and should be included in Maiko documentation , if it's not already. |
Updates CMakeLists.txt so that vdate.c does not get rebuilt if no files have changed.
Updates bin/mkvdate to incorporate a git version stamp (if git is present and the source is under
git control), along with an indication of whether the directory under git control is clean or dirty.
This information is NOT accessible from Lisp, but can be extracted from an ldex/ldesdl with a debugger
or by searching for the string "maiko git version" in the executable.